package edu.nf.dao.impl;


import edu.nf.SQLExecutor;
import edu.nf.beans.annotations.Component;
import edu.nf.dao.AddEmpDao;
import edu.nf.entity.Emp;
import edu.nf.utils.SQLExecutorFactory;

@Component("addEmp")
public class AddEmpDaoImpl implements AddEmpDao {


    @Override
    public void addEmp(Emp emp) {
        String sql = "INSERT INTO EMP_INFO(EMP_ID, EMP_NAME, EMP_SEX, EMP_PAY, EMP_DEPARTM, EMP_STATUS) VALUES(?,?,?,?,?)";
        SQLExecutor se = SQLExecutorFactory.getSQLExecutor();
        se.executeUpdate(sql, emp.getEmpid(),emp.getEmpname(), emp.getSex(),emp.getPay(),emp.getDepartmId(),1);
    }
}
